import { controller, post, get } from "../router/router_decorator";
import { Request, Response } from "express";

@controller("/user")
class UserController {
    @get('/')
    async get(req: Request, res: Response) {
        console.log("get")
        res.json({
            id: 1,
            name: 'Lucas',
            age: 18
        })
    }
    @post("/")
    async save(req: Request, res: Response) {
        console.log("save");
        res.json({
            success: true,
            message: "success"
        })
    }
}

export default new UserController();
